
const Customer = require( '../models/customer' );
const random = require( '../utils/random' );

let instance = {
    id: random.id(20),
    username: 'zhuyahong',
    password: 'hello',
    salt: random.salt(),
    nickname: '小朱',
    signUpTime: new Date(),
    signUpIp: '10.0.1.211'
}

Customer.create( instance )
        .then( res => console.log( 'result: ' , res ) )
        .catch( err => console.log( 'error: ' , err ) );